﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace LastFmDemo
{
    public partial class AlbumItem : UserControl
    {
        MainForm _mf;
        int _Index;

        public int Index
        {
            get { return _Index; }
            set { _Index = value; }
        }
        String _AlbumName;

        public String AlbumName
        {
            get { return _AlbumName; }
            set
            {
                _AlbumName = value;
                lbAlbumName.Text = value;
            }
        }
        String _Artist;

        public String Artist
        {
            get { return _Artist; }
            set
            {
                _Artist = value;
                lbArtist.Text = value;
            }
        }
        public AlbumItem()
        {
            InitializeComponent();
        }
        public AlbumItem(String albumName, String artist, int idx,MainForm mform)
        {
            InitializeComponent();
            Artist = artist;
            AlbumName = albumName;
            _mf = mform;
            Index = idx;
        }

        private void AlbumItem_Click(object sender, EventArgs e)
        {
            _mf.ShowDetail(1, Index);
        }
    }
}
